--------------------------------------------------------
--- Small-step SOS: Adding abrupt termination to IMP ---
--------------------------------------------------------

Suggested steps to follow in order to extend the original small-step SOS
of IMP in Maude to include abrupt termination:

1) Modify imp-smallstep.maude: Add Maude commands for executing the new programs.

2) Run imp-smallstep.maude: Everything working before should still work;
   the new programs should get stuck on their first attempt to terminate abruptly.

3) Modify imp-semantics-smallstep.maude:
   a) Add a new configuration construct for halting configurations, that is, for
      configurations which, when encountered, should end the computation immediately.
      The halting configurations will be generated by division by zero and/or halt.
   b) The existing small-step SOS rules do not need to change, but we need to add
      a new conditional rule for each existing conditional rule, to propagate the
      halting configurations through each non-constant language construct.
   c) Add the actual small-step SOS rules for division by zero and for halt,
      each of them yielding a halting configuration.

5) Run imp-smallstep.maude: Everything working before should still work the same way,
   and the new programs should yield a halting configuration.  One could stop here,
   but recall that, for the sake of uniformity, we decided to output a normal
   configuration at the end of the execution, no matter whether the program was
   terminated normally or abruptly.

6) Add the new rule transforming the halting configuration into a normal configuration.

7) Run imp-smallstep.maude and check that all programs evaluate properly,
   resulting in configurations that look the same way no matter whether the
   program was terminated normally or abruptly.


------------------------------
--- Observations, thoughts ---
------------------------------

1) We had to add a new type of configuration to distinguish halting situations
   in order to propagate them through the language constructs.

2) For each argument of each language construct we had to add a new rule propagating
   the potential halting configuration through that language construct.

3) The addition of a new rule to dissolve the halting configuration and terminate the
   program with a normal configuration generates an additional and artificial small step,
   thus affecting the intended computational granularity of the language.
